This goal of this notebook is to offer an easy way to process the outputs of the praise and sourcecred reward systems, perform an analysis of the results and calculate the token reward distribution. It uses mock data and should be considered a work-in-progress.
First, we import the relevant libraries, get the Data and set how many tokens we want to distribute
Now that we have selected the files, we can import them for processing. We can also set the total amount of tokens we want to distribute this period. We also set the name we want our output file to have.
Tip: Now that the file paths are set, you can safely click on "Cell > Run all below" from here on the menu bar to execute everything :)
Set the total amount of tokens we want to distribute this period. We also set the name we want our output file to have.
Let's dive into some data analysis! We'll use the metrics designed and explained by octopus🐙, and focus only on the praise rewards for now. Starting with:
This table will show us which percentage of the total rewards gets distributed to which top % of users. So "Top 50% -> 0.85" would mean that the top 50% of praisees received 85% of the total rewards
| Rewards | |
|---|---|
| Top 50% | 0.963532 |
| Top 20% | 0.829899 |
| Top 10% | 0.683384 |
| Top 5% | 0.474803 |
| Top 1% | 0.189664 |
This table will show us which percentage of the total rewards get distributed based on praise given by which top % of users. So "Top 50% -> 0.85" would mean that 85% of the total rewards are based on praise given by the top 50% praise givers.
| Rewards | |
|---|---|
| Top 50% | 0.942119 |
| Top 20% | 0.785381 |
| Top 10% | 0.671550 |
| Top 5% | 0.583964 |
| Top 1% | 0.323297 |
Now we can compare the relationship between praise given by a user and the praise they received
Next we will look at the Gini coefficient. Note that there is some debate if we want to use this metric at all, since it is usually employed to measure wealth distribution, and not compensation.
| Rewards | |
|---|---|
| All | 0.776488 |
| Top 50% | 0.636183 |
| Top 20% | 0.443304 |
Shannon Entropy) is a concept from communications theory, which is also used in measuring the diversity of a distribution. The formula for calculating Shannon Entropy among $n$ individuals is $$\\sum_{k=1}^n -p_k log_2(p_k),$$ where $p_k$ represents the proportion of the resource that user $k$ received.
Here we compare the actual Shannon Entropy with the maximum possible for the dataset, keeping in mind that a Shannon Entropy of 0 would mean one user holds all the rewards
| Rewards | |
|---|---|
| Entropy | 5.425584 |
| Max Entropy | 7.247928 |
| % of Max | 0.748570 |
Last but not least, the Nakamoto coefficient. The Nakamato Coefficient is defined as the smallest number of accounts who control at least 50% of the resource. Although its significance relates to the prospect of a 51% attack on a network, which may not be relevant in our context, we can still use it as an intuitive measure of how many individuals received the majority of a resource.
9
We can also take a look at the distribution of the received praise rewards
To aid the revision process, we can generate a table which sorts the praise by the size of the spread between the highest and lowest scores. These "controversial" praise instances can then be discussed in the quantifier review call. Index numbers are kept to make localization in the "big praise sheet" easier.
| index | ID | DATE | TO USER ACCOUNT | FROM USER ACCOUNT | REASON | SCORE 1 | SCORE 2 | SCORE 3 | SCORE 4 | ... | DISMISSED 2 | DISMISSED 3 | DISMISSED 4 | QUANTIFIER 1 USERNAME | QUANTIFIER 2 USERNAME | QUANTIFIER 3 USERNAME | QUANTIFIER 4 USERNAME | QUANTIFIER 4 ETH ADDRESS | AVG SCORE | SPREAD | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1571 | 621f79e343b89009366ca0b4 | 2021-11-25T23:00:00.000Z | divine_comedian#5493 | Mount Manu#3530 | for the logistics of the event that they’re ha... | 0 | 144 | 13 | 8 | ... | False | False | False | griff (💜, 💜)#8888 | missgene#7773 | hanners717#2022 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 55 | 144 |
| 1 | 1522 | 621f79e343b89009366ca07d | 2021-11-25T23:00:00.000Z | divine_comedian#5493 | chuygarcia.eth#6692 | for their presentation on Ethereum Colombia ye... | 0 | 144 | 21 | 0 | ... | False | False | False | griff (💜, 💜)#8888 | missgene#7773 | hanners717#2022 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 55 | 144 |
| 2 | 389 | 621f79e343b89009366c9bba | 2021-11-04T23:00:00.000Z | divine_comedian#5493 | Mount Manu#3530 | for coming to Colombia on November’s end and g... | 0 | 144 | 21 | 8 | ... | False | False | False | griff (💜, 💜)#8888 | missgene#7773 | hanners717#2022 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 57 | 144 |
| 3 | 702 | 621f79e343b89009366c9d02 | 2021-11-12T23:00:00.000Z | divine_comedian#5493 | Mount Manu#3530 | for going to Colombia in a few days and meetin... | 0 | 144 | 13 | 0 | ... | False | False | False | griff (💜, 💜)#8888 | missgene#7773 | hanners717#2022 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 52 | 144 |
| 4 | 717 | 621f79e343b89009366c9d11 | 2021-11-12T23:00:00.000Z | divine_comedian#5493 | Mount Manu#3530 | for being such a welcoming host and amazing ad... | 0 | 144 | 13 | 5 | ... | False | False | False | griff (💜, 💜)#8888 | missgene#7773 | hanners717#2022 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 54 | 144 |
| 5 | 597 | 621f79e343b89009366c9c93 | 2021-11-10T23:00:00.000Z | liviade#1387 | karmaticacid#1218 | for coming down to visit us in costa rica - wi... | 3 | 144 | 3 | 5 | ... | False | False | False | Maxwe11#7157 | missgene#7773 | divine_comedian#5493 | Tam2140#9361 | 0xcf79C7EaEC5BDC1A9e32D099C5D6BdF67E4cF6e8 | 38 | 141 |
| 6 | 1526 | 621f79e343b89009366ca087 | 2021-11-25T23:00:00.000Z | sem 🐝#0161 | Mount Manu#3530 | for conquering so many issues this week and wo... | 5 | 21 | 144 | 21 | ... | False | False | False | lee0007#8152 | missgene#7773 | divine_comedian#5493 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 47 | 139 |
| 7 | 239 | 621f79e343b89009366c9b24 | 2021-11-04T23:00:00.000Z | chuygarcia.eth#6692 | iviangita#3204 | for being an amazing leader and patriarch figu... | 144 | 8 | 34 | 3 | ... | False | False | False | griff (💜, 💜)#8888 | zhiwei#1356 | innov8tor3#3988 | enti#1546 | 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 | 47 | 136 |
| 8 | 102 | 621f79e343b89009366c9a8f | 2021-11-03T23:00:00.000Z | iviangita#3204 | Tam2140#9361 | for accepting the repsonisbility of acting Ste... | 144 | 34 | 34 | 8 | ... | False | False | False | griff (💜, 💜)#8888 | GideonRo#3175 | Parrachia#0450 | enti#1546 | 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 | 55 | 110 |
| 9 | 1410 | 621f79e343b89009366ca008 | 2021-11-25T23:00:00.000Z | Nuggan#5183 | iviangita#3204 | for hosting Params Parties | 1 | 89 | 13 | 0 | ... | False | False | False | bends#3537 | missgene#7773 | Zeptimus#3359 | shawn#7046 | 0xc68e8827FC1Dd3b2bc94Ca8b0228268f16dd6cf6 | 25 | 88 |
| 10 | 210 | 621f79e343b89009366c9b07 | 2021-11-04T23:00:00.000Z | liviade#1387 | iviangita#3204 | for being the mom and dad of this community | 5 | 89 | 3 | 5 | ... | False | False | False | Maxwe11#7157 | missgene#7773 | divine_comedian#5493 | Tam2140#9361 | 0xcf79C7EaEC5BDC1A9e32D099C5D6BdF67E4cF6e8 | 25 | 86 |
| 11 | 1374 | 621f79e343b89009366c9fe4 | 2021-11-25T23:00:00.000Z | Nuggan#5183 | kristofer#1475 | for writing a first version of the Rewards ana... | 3 | 89 | 13 | 13 | ... | False | False | False | bends#3537 | missgene#7773 | Zeptimus#3359 | shawn#7046 | 0xc68e8827FC1Dd3b2bc94Ca8b0228268f16dd6cf6 | 29 | 86 |
| 12 | 231 | 621f79e343b89009366c9b1c | 2021-11-04T23:00:00.000Z | liviade#1387 | iviangita#3204 | for pushing through and trying to come to Cost... | 5 | 89 | 3 | 13 | ... | False | False | False | Maxwe11#7157 | missgene#7773 | divine_comedian#5493 | Tam2140#9361 | 0xcf79C7EaEC5BDC1A9e32D099C5D6BdF67E4cF6e8 | 27 | 86 |
| 13 | 363 | 621f79e343b89009366c9ba0 | 2021-11-04T23:00:00.000Z | karmaticacid#1218 | Mount Manu#3530 | for the Commons Simulator and for the brillian... | 13 | 5 | 89 | 5 | ... | False | False | False | lee0007#8152 | GideonRo#3175 | innov8tor3#3988 | enti#1546 | 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 | 28 | 84 |
| 14 | 1005 | 621f79e343b89009366c9e62 | 2021-11-17T23:00:00.000Z | durgadas#9280 | ALOYSIOUS#3049 | for his commitment to \"doing the work\", for ... | 8 | 89 | 5 | 8 | ... | False | False | False | Usua◎ Silver#2618 | missgene#7773 | divine_comedian#5493 | Vyvy-vi#5040 | 0x2fA130927814B590623031e846f059df9554FdDe | 27 | 84 |
| 15 | 1129 | 621f79e343b89009366c9eee | 2021-11-21T23:00:00.000Z | gabi#4807 | Mount Manu#3530 | for pushing forwards on the Gardens so that we... | 5 | 5 | 89 | 8 | ... | False | False | False | lee0007#8152 | missgene#7773 | divine_comedian#5493 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 26 | 84 |
| 16 | 1266 | 621f79e343b89009366c9f78 | 2021-11-22T23:00:00.000Z | danlessa#2831 | akrtws (TE Academy)#4246 | for presenting Token Engineering to the crypto... | 8 | 89 | 21 | 13 | ... | False | False | False | lee0007#8152 | missgene#7773 | Zeptimus#3359 | PhilH#1102 | 0xAa01DeC5307CF17F20881A3286dcaA062578cea7 | 32 | 81 |
| 17 | 1187 | 621f79e343b89009366c9f28 | 2021-11-21T23:00:00.000Z | sem 🐝#0161 | Mount Manu#3530 | for their coding work inside our community | 8 | 8 | 89 | 21 | ... | False | False | False | lee0007#8152 | missgene#7773 | divine_comedian#5493 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 31 | 81 |
| 18 | 1527 | 621f79e343b89009366ca088 | 2021-11-25T23:00:00.000Z | elessar.eth#7945 | Mount Manu#3530 | for conquering so many issues this week and wo... | 13 | 89 | 89 | 13 | ... | False | False | False | Mount Manu#3530 | liviade#1387 | divine_comedian#5493 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 51 | 76 |
| 19 | 1380 | 621f79e343b89009366c9fea | 2021-11-25T23:00:00.000Z | hz#8826 | kristofer#1475 | for working on porting the 1hive pollen bot fo... | 13 | 13 | 89 | 13 | ... | False | False | False | Usua◎ Silver#2618 | liviade#1387 | innov8tor3#3988 | enti#1546 | 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 | 32 | 76 |
| 20 | 1128 | 621f79e343b89009366c9eed | 2021-11-21T23:00:00.000Z | Mount Manu#3530 | Mount Manu#3530 | for transcribing the Community Call’s praise | 89 | 21 | 13 | 5 | ... | False | False | False | griff (💜, 💜)#8888 | AmwFund#0979 | teaci#6108 | PhilH#1102 | 0xAa01DeC5307CF17F20881A3286dcaA062578cea7 | 32 | 76 |
| 21 | 1019 | 621f79e343b89009366c9e70 | 2021-11-17T23:00:00.000Z | Vyvy-vi#5040 | Tam2140#9361 | for all the work you have put into the new dis... | 21 | 55 | 89 | 8 | ... | False | False | False | Usua◎ Silver#2618 | GideonRo#3175 | innov8tor3#3988 | shawn#7046 | 0xc68e8827FC1Dd3b2bc94Ca8b0228268f16dd6cf6 | 43 | 68 |
| 22 | 93 | 621f79e343b89009366c9a86 | 2021-11-02T23:00:00.000Z | divine_comedian#5493 | Tam2140#9361 | for being a HERO and eliminating the murky wit... | 0 | 55 | 21 | 8 | ... | False | False | False | griff (💜, 💜)#8888 | missgene#7773 | hanners717#2022 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 28 | 55 |
| 23 | 1602 | 621f79e343b89009366ca0d3 | 2021-11-25T23:00:00.000Z | divine_comedian#5493 | Mount Manu#3530 | for providing so much value as Stewards of our... | 0 | 55 | 21 | 8 | ... | False | False | False | griff (💜, 💜)#8888 | missgene#7773 | hanners717#2022 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 28 | 55 |
| 24 | 596 | 621f79e343b89009366c9c92 | 2021-11-10T23:00:00.000Z | pKrepe#5682 | karmaticacid#1218 | for making improvements on the dashboard | 21 | 55 | 0 | 0 | ... | False | False | False | Maxwe11#7157 | missgene#7773 | divine_comedian#5493 | osycross(🦎🦎)#5943 | 0xFe99402763531258875949D449db20157b77Ec5C | 27 | 55 |
25 rows × 25 columns
We can also plot the spread against the average score for a more visual search.
ATTENTION! Keep in mind that this is just meant as a visual aid. If there are several praise instances with similar spread and average quant number, all but one end up "hidden" on the chart. For the full list you have to use the table.
Now for something more fun: let's surface the top "praise flows" from the data. Thanks to @inventandchill for this awesome visualization! On one side we have the top 20 praise givers separately (modifiable by changing the variable n_senders), on the other the top 25 receivers (modifiable by changing the variable n_receivers). The people outside the selection get aggregated into the "REST FROM" and "REST TO" categories.
Next we can see the distribution made by the SourceCred algorithm.
Let's take a closer look at each quantifier. In the following step we will use the raw praise data to zoom in on how each quantifier scored the praises:
With the above table we can easily see how much praise each quantifier rated.
Let's see the mean praise scores every quantifier gave.
To send the allocations to the DAO for distribution, we need to put all data together and add the rewards for the reward board and the quantifiers.
Let's take a final look at the total distribution. Click on the legend to filter out specific reward sources
That's it! We can now download the final distribution files and upload them to GitHub for future reference. We want to export 3 different files:
- The final reward allocations, separated by source
- The final reward allocations, in a disperse.app-readable format
- The extended praise data, detailing the how many tokens each single praise netted (for future reference)